package com.zks.util.returnData;

/**
 * 自定义异常
 */
public enum OpenResponseCode {
    SUCCESS(0, "操作成功"),
    FAILED(-1, "操作失败"),
    EXCEPTION(1000, "未知异常"),
    NOT_SIGN_IN(2000, "未登录"),
    ILLEGAL_ARGUMENT(2001, "参数异常"),
    CODE_ERROR(2002, "code错误或已过期"),
    AUTH_KEY_ERROR(2003, "错误的authKey"),
    REQUEST_TIME_OUT(2004, "请求超时"),
    SIN_STR_ERROR(2005, "签名错误"),
    NO_AUTHORITY(2006, "没有权限"),
    DATA_NOT_EXIST(3001, "指定数据不存在");

    private int code;
    private String description;

    private OpenResponseCode(int code, String description) {
        this.code = code;
        this.description = description;
    }

    public int getCode() {
        return this.code;
    }

    public String getDescription() {
        return this.description;
    }
}
